package pixeleditor.gui;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;


@SuppressWarnings("serial")
public class MainFrame extends JFrame {
	
	public static final int HEIGHT_ON_WINDOW = 700;
	public static final int WIDTH_ON_WINDOW = 990;
	
	public MainFrame() {
		super("Pixel Editor");
		setJMenuBar(new Menu());
		add(new GridPanel(), BorderLayout.NORTH);
		add(new BasePanel(), BorderLayout.SOUTH);

		pack();

		//Set the default start location of the frame in the middle of the screen
		Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
		setLocation(d.width/2 - WIDTH_ON_WINDOW/2, d.height/2 - 750/2);
		
		setResizable(false);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setVisible(true);
	}
}
